slt+accounting: surface GroupValuesRows::emit untracked decode (closes #22739)#22741
Open
avantgardnerio wants to merge 2 commits into
Open
slt+accounting: surface GroupValuesRows::emit untracked decode (closes #22739)#22741avantgardnerio wants to merge 2 commits into
avantgardnerio wants to merge 2 commits into
Conversation
`GroupedHashAggregateStream`'s spill path emits via `GroupValuesRows::emit` → `RowConverter::convert_rows` → `decode_column`, which allocates per-column buffers (`arrow_row::list::decode` for List keys, `decode_binary`/`decode_string` for Utf8 keys) without `MemoryReservation::try_grow`. Surfaced by apache#22626.
Tighten HEADROOM_FACTOR 8.0 -> 5.0 and update the SLT key shape (Utf8 + List<Int> schema poisoner) so the test routes through GroupValuesRows on upstream main. The framework then catches GroupedHashAggregateStream::emit -> GroupValuesRows::emit -> RowConverter::convert_rows -> decode_column allocating a MutableBuffer::with_capacity without MemoryReservation::try_grow. Overdraft observed: ~1.3 MB. Same operator and emit path that caused a 79-pod OOM cascade at one DataFusion-based log analytics deployment on 2026-05-20.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #22739. Follow-up in the family of #22721 / #22723 — same framework (#22626), different operator.
Rationale for this change
Described in issue.
What changes are included in this PR?
Two changes:
HEADROOM_FACTOR: f64 = 8.0→5.0indatafusion/sqllogictest/src/accounting_pool.rs. Tighter framework slack so untracked allocations surface as test failures sooner. Same shape as Lower SLT HEADROOM_FACTOR 8.0 -> 5.0 to surface nested_loop_join_spill leak #22721.New SLT
group_by_spill_row_decode.sltthat exercises the row-encodedGroupValuespath. Uses a wide Utf8 key paired with a smallList<Int>"schema poisoner" so the schema falls outsidemulti_group_by::supported_typeand routes throughGroupValuesRows(single-column Utf8 alone would route toGroupValuesBytes). At pool=1M withHEADROOM_FACTOR=5.0the test fails withallocator overdraft: account balance at panic = -1344326 bytes, stack frames pointing atarrow_row::variable::decode_binary_view_inner←decode_string_view←decode_column←RowConverter::convert_rows←GroupValuesRows::emit←GroupedHashAggregateStream::emit←spill.Are these changes tested?
By the SLT, yes.
Are there any user-facing changes?
Less OOMs